package cn.pink.common.entity.game.info;

import cn.pink.common.constant.DBConst;
import cn.pink.core.entity.AbstractEntity;
import cn.pink.core.gen.entity.Entity;

/**
 * 角色信息
 * @Author: pink
 * @Date: 2022/7/18 17:47
 */
@Entity(tableKey = DBConst.DB_KEY_HUMAN_INFO)
public class EntityHumanInfo extends AbstractEntity {
    /** 账号 */
    private long account;

    /** 渠道id */
    private String channelId;

    /** 设备id */
    private String deviceId;

    /** 昵称 */
    private String name;

    /** 等级 */
    private int level;

    /** 最后一次登入时间 */
    private long timeLogin;

    /** 最后一次登出时间 */
    private long timeLogout;

    /** 角色注册时间 */
    private long timeRegister;

    /** 需要被初始化 */
    private boolean needInit;

    public EntityHumanInfo(String humanId) {
        init(humanId);
    }

    @Override
    public void makeKey() {
        keyPrefix = DBConst.DB_KEY_HUMAN_INFO;
    }

    public long getAccount() {
        return account;
    }

    public void setAccount(long account) {
        this.account = account;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public long getTimeLogin() {
        return timeLogin;
    }

    public void setTimeLogin(long timeLogin) {
        this.timeLogin = timeLogin;
    }

    public long getTimeLogout() {
        return timeLogout;
    }

    public void setTimeLogout(long timeLogout) {
        this.timeLogout = timeLogout;
    }

    public long getTimeRegister() {
        return timeRegister;
    }

    public void setTimeRegister(long timeRegister) {
        this.timeRegister = timeRegister;
    }

    public boolean isNeedInit() {
        return needInit;
    }

    public void setNeedInit(boolean needInit) {
        this.needInit = needInit;
    }
}
